<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="../baselayout/import.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="${staticPath}/assets/css/bootstrap.min.css">
<link rel="stylesheet" href="${staticPath}/assets/css/fp-index.css">
<title>特征工程</title>
</head>
<body>
<div class="fp-header text-center">
	<h1>数据集相关信息</h1>
	<div class="tip">
		<a class="btn btn-success" href="${staticPath}/fp/download.do?filename=feature.txt">下载feature</a>
		<a class="btn btn-success" href="${staticPath}/fp/download.do?filename=label.txt">下载label</a>
		<a class="btn btn-success" href="${staticPath}/fp/download.do?filename=vectors.txt">下载vectors</a>
		<a class="btn btn-success" href="${staticPath}/fp/train.do">重新训练模型</a>
		<a class="btn btn-success" href="${staticPath}/fp/tfidf.do">文档转化页面</a>
		<a class="btn btn-success" href="${staticPath}/fp/fpadmin.do">训练数据集管理</a>
	</div>
</div>
<c:choose>
      <c:when test="${isExist}">
			<table class="table">
			      <caption>文档类别数目表,共有${totalDoc}文档</caption>
			      <thead>
			        <tr>
			          <th>#</th>
			          <th>类别</th>
			          <th>文档数量</th>
			          <th>特征数目</th>
			         
			        </tr>
			      </thead>
			      <tbody>
					<c:forEach items="${eachClassCount}" var = "it" varStatus = "idx">
						<tr>
				          <th scope="row">${idx.index + 1 }</th>
				          <td class="lb"><c:out value="${it.label}" /> </td>
				          <td><c:out value="${it.docCount}" /> </td>
				          <td><c:out value="${it.termCount}" /> </td>
				         
				        </tr>
					</c:forEach>   
			      </tbody>
			</table>
		    <div class="black_tech">
			    	<div class="panel panel-primary">
						<div class="panel-heading">
		    				<h3 class="panel-title">内省/反射黑科技,获取特定Context变量值</h3>
		  				</div>
		  				<div class="panel-body">
		  				   <form action="./ctxIntrospect.do" method="post" target="_blank">	    	
			  					<span>请输入要获取值的字段名称</span>
							    <input class="form-control" type="text" name="field" value="">
				    			<input class="btn btn-primary" style="margin:10px 0px" type="submit" value="走你">
		  				   </form>
		  				   <table class="table">
							      <caption>Context类有效字段名称</caption>
							      <thead>
							       	<tr>
							          <th>#</th>
							          <th>名称</th>
							          <th>类别</th>
							          <th>说明</th>
							        </tr>
							      </thead>
							      <tbody>	
										<tr>
								          <th>1</th>
								          <td><code>inputDir</code></td>
								          <td><code>String</code></td>
								          <td>输入文件夹</td>
								        </tr>
								        <tr>
								          <th>2</th>
								          <td><code>outputDir</code></td>
								          <td><code>String</code></td>
								          <td>输出文件夹</td>
								        </tr>
								        <tr>
								          <th>3</th>
								          <td><code>待补充</code></td>
								          <td><code>待补充</code></td>
								          <td>待补充</td>
								        </tr>
								        
							      </tbody>
							</table>
						</div>
		  				<div class="panel-footer">*值有可能为空</div>
					</div>
			    </div>
      </c:when>
      <c:otherwise>
    	<div class="header">
			<div class="tip">
				<a class="btn btn-success" href="${staticPath}/fp/train.do">模型不存在,点击训练模型</a>
				<p>${message} </p>
			</div>
		
		</div>
      </c:otherwise>
</c:choose>


    

</body>
</html>